public class Main {
    public static void main(String[] args) {
      int x=1200;
      String s=Integer.toString(x);
      StringBuffer b=new StringBuffer(s);
      b.reverse();
      String t=b.toString();
      int y=Integer.parseInt(t);
        System.out.println(y);
        y=Integer.parseInt(new StringBuffer(Integer.toString(x))
                .reverse().toString());
        System.out.println(y);
    }
}
